Optimal. Leaf size=88 \[ -\frac {a}{d (c+d x)}+\frac {b f \text {Ci}\left (x f+\frac {c f}{d}\right ) \cos \left (e-\frac {c f}{d}\right )}{d^2}-\frac {b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d^2}-\frac {b \sin (e+f x)}{d (c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {3317, 3297, 3303, 3299, 3302} \[ -\frac {a}{d (c+d x)}+\frac {b f \text {CosIntegral}\left (\frac {c f}{d}+f x\right ) \cos \left (e-\frac {c f}{d}\right )}{d^2}-\frac {b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d^2}-\frac {b \sin (e+f x)}{d (c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3297
Rule 3299
Rule 3302
Rule 3303
Rule 3317
Rubi steps
\begin {align*} \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx &=\int \left (\frac {a}{(c+d x)^2}+\frac {b \sin (e+f x)}{(c+d x)^2}\right ) \, dx\\ &=-\frac {a}{d (c+d x)}+b \int \frac {\sin (e+f x)}{(c+d x)^2} \, dx\\ &=-\frac {a}{d (c+d x)}-\frac {b \sin (e+f x)}{d (c+d x)}+\frac {(b f) \int \frac {\cos (e+f x)}{c+d x} \, dx}{d}\\ &=-\frac {a}{d (c+d x)}-\frac {b \sin (e+f x)}{d (c+d x)}+\frac {\left (b f \cos \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cos \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d}-\frac {\left (b f \sin \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sin \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d}\\ &=-\frac {a}{d (c+d x)}+\frac {b f \cos \left (e-\frac {c f}{d}\right ) \text {Ci}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {b \sin (e+f x)}{d (c+d x)}-\frac {b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 72, normalized size = 0.82 \[ \frac {-\frac {d (a+b \sin (e+f x))}{c+d x}+b f \text {Ci}\left (f \left (\frac {c}{d}+x\right )\right ) \cos \left (e-\frac {c f}{d}\right )-b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )}{d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.75, size = 135, normalized size = 1.53 \[ -\frac {2 \, b d \sin \left (f x + e\right ) - 2 \, {\left (b d f x + b c f\right )} \sin \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) + 2 \, a d - {\left ({\left (b d f x + b c f\right )} \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) + {\left (b d f x + b c f\right )} \operatorname {Ci}\left (-\frac {d f x + c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right )}{2 \, {\left (d^{3} x + c d^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.53, size = 578, normalized size = 6.57 \[ \frac {{\left ({\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} f^{2} \cos \left (\frac {c f - d e}{d}\right ) \operatorname {Ci}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) - c f^{3} \cos \left (\frac {c f - d e}{d}\right ) \operatorname {Ci}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) + d f^{2} \cos \left (\frac {c f - d e}{d}\right ) \operatorname {Ci}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) e + {\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} f^{2} \sin \left (\frac {c f - d e}{d}\right ) \operatorname {Si}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) - c f^{3} \sin \left (\frac {c f - d e}{d}\right ) \operatorname {Si}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) + d f^{2} e \sin \left (\frac {c f - d e}{d}\right ) \operatorname {Si}\left (-\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c f + d e}{d}\right ) - d f^{2} \sin \left (\frac {{\left (d x + c\right )} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )}}{d}\right )\right )} b d^{2}}{{\left ({\left (d x + c\right )} d^{4} {\left (\frac {c f}{d x + c} - f - \frac {d e}{d x + c}\right )} - c d^{4} f + d^{5} e\right )} f} - \frac {a}{{\left (d x + c\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 141, normalized size = 1.60 \[ \frac {-\frac {a \,f^{2}}{\left (\left (f x +e \right ) d +c f -d e \right ) d}+f^{2} b \left (-\frac {\sin \left (f x +e \right )}{\left (\left (f x +e \right ) d +c f -d e \right ) d}+\frac {\frac {\Si \left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}+\frac {\Ci \left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.50, size = 196, normalized size = 2.23 \[ -\frac {\frac {2 \, a f^{2}}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f} - \frac {{\left (f^{2} {\left (-i \, E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{2}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right ) + f^{2} {\left (E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{2}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )\right )} b}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {a+b\,\sin \left (e+f\,x\right )}{{\left (c+d\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \sin {\left (e + f x \right )}}{\left (c + d x\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________